{% extends "zerver/emails/email_base_messages.html" %}

{% block preheader %}
    {% for recipient_block in messages %}
        {% for sender_block in recipient_block.senders %}
            {% for message_block in sender_block.content %}
            {{ message_block.html|safe }}
            {% endfor %}
        {% endfor %}
    {% endfor %}
{% endblock %}

{% block content %}
    {% if show_message_content %}
        {% for recipient_block in messages %}
            {% for sender_block in recipient_block.senders %}
                <div class="missed_message">
                    {% if sender_block.sender %}<div class="missed_message_sender">{{ sender_block.sender }}</div>{% endif %}
                    {% for message_block in sender_block.content %}
                        {{ message_block.html|safe }}
                    {% endfor %}
                </div>
            {% endfor %}
        {% endfor %}
    {% endif %}
{% endblock %}

{% block manage_preferences %}
<div class="email-preferences">
    &mdash;<br>
    {% if mention %}
    You are receiving this email because you were mentioned.<br>
    {% elif stream_email_notify %}
    You are receiving this email because you have email notifications enabled for this stream.<br>
    {% endif %}
    <a href="{{ realm_uri }}/#settings/notifications">Manage email preferences</a> | <a href="{{ unsubscribe_link }}">Unsubscribe</a> from missed message emails.<br>
    {% if reply_to_zulip %}
        Reply to this email directly, or <a href="{{ narrow_url }}">view it in Zulip</a><br>
    {% else %}
        Do not reply to this message. This Zulip server is not
    configured to accept incoming emails (<a href="https://zulip.readthedocs.io/en/latest/production/email-gateway.html">help</a>). <a href="{{ narrow_url }}">Reply in Zulip</a>.<br>
    {% endif %}
</div>
{% endblock %}
